"use strict";

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;

    router.get("/", controller.home.index);
    // 01-01获取OSS临时密钥接口
    router.get("/x/v1/common/oss/stsDispatcher", controller.oss.dispatchSTS);
    // 01-02服务器简单上传接口
    router.post("/x/v1/common/oss/simpleUploader", controller.oss.simpleUploader);
    // 02-01音频资源上传回调接口
    router.post("/x/v1/audio/resource/uploader", controller.audio.audioResource.audioResourceUploader);
    // 02-02音频封面上传回调接口
    router.post("/x/v1/audio/cover/uploade/:rid", controller.audio.audioResource.audioCoverUploader);
    // 02-03音频资源信息修改接口
    router.put("/x/v1/audio/info/updator/:rid", controller.audio.audioResource.audioInfoUpdater);
    // 02-04音频资源台词修改接口
    router.put("/x/v1/audio/lyric/updator/:rid", controller.audio.audioResource.audioLyricUpdater);
    // 02-05音频资源删除接口
    router.delete("/x/v1/audio/resource/destroyer/:rid", controller.audio.audioResource.audioResourceDestroyer);
    // 02-06音频资源查询接口(按资源id)
    router.get("/x/v1/audio/resource/finder/:rid", controller.audio.audioResource.audioResourceFinder);
};
